<%--
    Document   : verif
    Created on : 15 juin 2011, 15:26:27
    Author     : maboisba
--%>

<%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.io.FileNotFoundException"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Service Vérification</title>
  </head>
  <body>
    <a href="/fiche_voeu.jsp">Accéder à votre fiche de voeu</a>
    <p/>
    <%
              try {
                String url = request.getRealPath("erreurs.log");

                InputStreamReader in = new InputStreamReader(new FileInputStream(url), "ISO-8859-1");
                BufferedReader bf = new BufferedReader(in);
                String erreur = new String();
                boolean vide = true;
                while ((erreur = bf.readLine()) != null) {
                  vide = false;
                  out.println("<p>" + erreur + "</p>");
                }
                if(erreur == null && vide)
                  out.println("Aucune erreur");

              }
              catch (FileNotFoundException e) {
                //out.println();
                out.print("Fichier non trouvé");
              }
    %>
  </body>
</html>
